use crate::controller::index_controller::{index, info, info1, serverinfo,readdata};
use actix_files as fs;
use actix_web::web::{get, resource as r, ServiceConfig};

pub fn config_route(cfg: &mut ServiceConfig) {
    cfg.service(r("/home").route(get().to(index)))
        .service(r("/info").route(get().to(info)))
        .service(r("/info1").route(get().to(info1)))
        .service(serverinfo)
        .service(readdata);

    cfg.service(fs::Files::new("/", "./static").index_file("index.html"));
}
